package com.example.webmodule.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@Builder
@TableName(value = "service_interface", resultMap = "ServiceInterfaceResultMap")
@JsonIgnoreProperties(value = {"handler"})
public class ServiceInterface {
    private Integer id;
    private String ip;
    private Integer port;
    private String uri;
    private String metadata;

    private String instanceId;

    private String serviceId;

    private String scheme;
    private Date createdAt;
    // 请求路径
    private String path;
    // 请求方法（GET/POST/PUT/DELETE）
    private String method;
    // 类对象名称
    private String tags;
    // 方法名称
    private String operationId;

    // 服务状态： UP：正常 DOWN：异常
    private String status;

    // 是否删除 0:未删除 1：已删除
    private int deleteFlag;
    // 数据插入时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    // 数据更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}